import requests

# login_url1 = "http://127.0.0.1:8021/u/v1/user/pwd_login"
#
# data22 = {
#     "mobile": "18297651350",
#     "password": "admin123"
# }
#
# res = requests.post(login_url1, json=data22)
# print(res)
# print(res.text)

login_url2 = "http://127.0.0.1:8021/u/v1/user/list"

headers = {
    "x-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MSwiTmlja05hbWUiOiIiLCJBdXRob3JpdHlJZCI6MCwiZXhwIjoxNjE3MzI5NjE4LCJpc3MiOiJpbW9vYyIsIm5iZiI6MTYxNDczNzYxOH0.nB0rXpjSR9JS58CGvP9594lUYO2eEP00VwSRMaw4SAA"
}

# data22 = {
#     "mobile": "18297651350",
#     "password": "admin123"
# }

res = requests.get(login_url2, headers = headers)
print(res)
print(res.text)

# /Users/liuxing/Desktop/xuexi/learning-in-python/PythonStudy/venv/bin/python /Users/liuxing/Desktop/xuexi/learning-in-python/PythonStudy/Code/request.py
# <Response [200]>
# {"expired_at":1617329618000,"id":1,"nick_name":"","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJRCI6MSwiTmlja05hbWUiOiIiLCJBdXRob3JpdHlJZCI6MCwiZXhwIjoxNjE3MzI5NjE4LCJpc3MiOiJpbW9vYyIsIm5iZiI6MTYxNDczNzYxOH0.nB0rXpjSR9JS58CGvP9594lUYO2eEP00VwSRMaw4SAA"}
#
# Process finished with exit code 0
